PROJECT(dataReport)
CMAKE_MINIMUM_REQUIRED(VERSION 2.6)
add_definitions(-DFTP) 
SET(SRC_LIST DataReportMain.cc logger.cc DataReportManager.cc timer.cc ReportProtocol.cc)
ADD_EXECUTABLE(dataReport ${SRC_LIST})
TARGET_LINK_LIBRARIES(dataReport pthread ssl cm ndb clogger)

IF(NOT EXISTS ${EXECUTABLE_OUTPUT_PATH})
    EXEC_PROGRAM(mkdir ${PROJECT_SOURCE_DIR} ARGS ${EXECUTABLE_OUTPUT_PATH})
ENDIF()

EXEC_PROGRAM(cp ${PROJECT_SOURCE_DIR} ARGS ${PROJECT_SOURCE_DIR}/ftpcfg.xml ${EXECUTABLE_OUTPUT_PATH})
INSTALL(TARGETS dataReport
	RUNTIME DESTINATION bin
)

INSTALL(FILES ftpcfg.xml 
    DESTINATION bin
)


